#!/bin/sh
if [ $# == 3 ]; then
	app=$1;
    ds=$2;
    end=$3;
elif [ $# == 2 ]; then
    app=$1
	ds=$2;
    end=$2;
else
    echo "error params."
    exit 0
fi

path='/home/hadoop/xiyong.lxy/logs/nginx/hddl'
while [ ${ds} -le ${end} ]
do
    echo ${ds}
	hive -dAPP=${app} -dDS=${ds} -f ${path}/x_d_nginx_pt.q
    ds=`date -d "$dt +1 days" "+%Y%m%d"`;
done
